//
//  BConversionCurrencyButton.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2019/1/4.
//  Copyright © 2019 guoshikeji. All rights reserved.
//

#import "BConversionCurrencyButton.h"

@implementation BConversionCurrencyButton

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.contentEdgeInsets = UIEdgeInsetsMake(5, 5, 5, 5);
        [self setTitleColor:[UIColor qmui_colorWithHexString:@"#666666"] forState:UIControlStateNormal];
        self.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
        self.imagePosition = QMUIButtonImagePositionRight;
        //
        self.needMoreArrorw = false;
    }
    return self;
}
//
- (void)setCurrencySign:(NSString *)currencySign {
    [self setTitle:currencySign forState:UIControlStateNormal];
}
//
- (void)setNeedMoreArrorw:(BOOL)needMoreArrorw {
    _needMoreArrorw = needMoreArrorw;
    //
    self.userInteractionEnabled = needMoreArrorw;
    //
    if (needMoreArrorw) {
        self.spacingBetweenImageAndTitle = 12.0;
        UIImage *image = LOAD_IMAGE(@"gscommon_login_more");
        image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
        [self setImage:image forState:UIControlStateNormal];
    }else {
        self.spacingBetweenImageAndTitle = 0.0;
        [self setImage:nil forState:UIControlStateNormal];
    }
    [self setTintColor:[UIColor qmui_colorWithHexString:@"#C4C8D1"]];
}


@end
